package com.svms.data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;

import com.svms.service.vo.IndentVO;

public class IndentData {

	public static List<IndentVO> getAllIndentInfo() {

		Random randomGenerator = new Random();
		List<IndentVO> indentDataList = new ArrayList<IndentVO>();

		for (int i = 0; i < 5; i++) {

			int hi = 120;
			int lo = 100;
			int id = (randomGenerator.nextInt(hi - lo) + lo);
			IndentVO indentVO2 = new IndentVO();
			indentVO2.setInvoiceNumber(String.valueOf(id));
			indentVO2.setIndentDate(new Date());
			// indentVO2.setIndentId(String.valueOf(id));
			indentVO2.setAmount(String.valueOf(randomGenerator.nextInt(1000)));
			indentVO2.setCreatedUser("om39a");
			indentVO2.setApprovalManager("Amar");
			indentVO2.setApproved(false);
			indentVO2.setBillItems(VehicleSparesData.getAllIndentInfo(id));
			indentDataList.add(indentVO2);
		}
		System.out.println("!!!!");
		System.out.println(indentDataList);
		System.out.println("!!!!");
		return indentDataList;

	}

}
